Skip to content

feat(dialog): add names and replace Snackbar bug#20484

Closed
Galal-20 wants to merge 2 commits intoankidroid:mainfrom
Galal-20:Improve-the-Create-deck,-Create-subdeck,-and-Rename-deck-dialogs
Closed

feat(dialog): add names and replace Snackbar bug#20484
Galal-20 wants to merge 2 commits intoankidroid:mainfrom
Galal-20:Improve-the-Create-deck,-Create-subdeck,-and-Rename-deck-dialogs

Conversation

@Galal-20
Copy link

Purpose:

This PR improves the user experience in deck creation dialogs.
Added hint text (hintRes) for different deck dialog types (DECK, SUB_DECK, RENAME_DECK), so users see a label in the EditText explaining what to type.
Replaced Snackbar calls in showDialog() with displayFeedback() to provide consistent feedback when the deck name is empty or already exists.
Removed commented-out Snackbar code to clean up the implementation.

Fixes:

Fix #20475

Approach

 Updated showDialog() to set hint dynamically based on deckDialogType.
 Replaced calls to Snackbar with displayFeedback() for empty or duplicate deck names.
 Cleaned up commented-out Snackbar lines for clarity.

How Has This Been Tested?

Tested creating new decks, subdecks, filtered decks, and renaming decks on a physical device.
Verified that:
      Hint text appears correctly on the EditText for each dialog type.
      Pressing the checkmark button on the keyboard shows feedback via displayFeedback(), not Snackbar.
      Invalid or duplicate deck names disable the positive button as expected.
1 2 3 4

- Added Name hint text (hintRes) for different deck dialog types
  (DECK, SUB_DECK, RENAME_DECK, FILTERED_DECK)
- Replaced Snackbar calls in showDialog() with displayFeedback() for
  consistent user feedback
- Cleaned up commented-out Snackbar code
@github-actions
Copy link
Contributor

Important

Maintainers: This PR contains Strings changes

  1. Sync Translations before merging this PR and wait for the action to complete
  2. Review and merge the auto-generated PR in order to sync all user-submitted translations
  3. Sync Translations again and merge the PR so the huge automated string changes caused by merging this PR are by themselves and easy to review

@david-allison
Copy link
Member

david-allison commented Mar 15, 2026

With apologies:

  • This was assigned to someone else
  • The code changes don't match what was expected. The hint should be new name or [deck] name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve the "Create deck", "Create subdeck", and "Rename deck" dialogs

2 participants